Subject: Update circuit collision

From: "Steve Klein" <[email-masked]>
Date: Mon, 7 Feb 94 17:16:02 EST

Bernie, I am finally getting around to responding to the following note:

>The following is my second attempt to  write what I think should happen.
>Can you please correct this flow or explain  where in the RFC FSM this
>case is handled.
>
>In the first proposal I left out the ICANREACH and REACH_ACK but
>realized that the establishment of Circuit IDs require these.
>
>Thank You
>
>Bernie Brady
>
>Circuit Establishment Collision
>
>    LAN             Origin DLSw    Origin DLSw         LAN
>
>                |   DISCONNECTED |  DISCONNECTED    | Note: 1         |
>|                  |
>                |                |                  |     <---TEST
> TEST--->       |                |                  |
>                |                |                  <--DLC_RESOLVE_C
> DLC_RESOLVE_C-->                |                  |
>                |                <--CANUREACH       |
>                |     CANUREACH-->                  |
>                |                |                  | Note: 2         |
>|                  |
>                |     ICANREACH-->                  |
>                |                <--ICANREACH       |
>                |                |                  |
>                |                |                  | Note: 3         |
>|                  |
>                |                <--REACH_ACK       |
>                |     REACH_ACK-->                  |
>                |                |                  |
>                |                |                  |
>                <--DLC_RESOLVE_R |    DLC_RESOLVE_R->
>                |                |                  |
>  <--TEST       |                |                  |    TEST--->
>                |                |                  | Note: 4         |
>|                  |
>                |[CIRCUIT_PNDING]| [CIRCUIT_PNDING] |
>                |                |                  |
>                | [CIRCUIT_ESTAB]| [CIRCUIT_ESTAB]  |
>
>Note 1. Once the TEST  frame has been received both LANs present a
>DLC_RESOLVE_C request to their associated DLSw.  On receiving a
>DLC_RESOLVE_C request both DLSw's search their destination table caches
>for a matching destination MAC address.  If one is found they forwards a
>CANUREACH request to the associated target DLSw.  If one is not found
>then they forward a CANUREACH request to each of their designated target
>DLSw's.
>
>Note 2. On receiving a CANUREACH request and identify that it
>has a CANUREACH outstanding  for the opposite Data Link ID both
>DLSws respond with an ICANREACH.  Any other  CANUREACH requests for the
>opposite Data Link ID are ignored.
>
>Note 3. When the each  DLSw receives the ICANREACH response it places
>the circuit into the CIRCUIT_PENDING state and responds with a REACH_ACK
>to the other DLSw. In the process of sending REACH_ACK the DLSw will
>also send a DLC_RESOLVE_R response to the data link interface.   This
>informs the data link interface to respond to the  original TEST
>request which started the route discovery process.
>
>Note 4. On receipt of the REACH_ACK each DLSw places the circuit into
>the CIRCUIT_ESTAB state and stops the non-REACH_ACK response timer.
>
>Also noted is that XID could replace the TEST for initiating this circuit
>establishment.
>

The RFC does not handle collisions.  I looked at this proposal and the
only problem I have with it is the result that two circuits are set up
instead of one.  The only way to avoid this would be for one DLSw to
to swap the origin and MAC addresses and SAPs in the Data Link ID and
swap the origin and destination circuit IDs.

Below is alternate proposal for avoiding collisions (one I mentioned
a while back but never put on the table).  It attempts to avoid
collisions by allowing only one circuit to come up yet have minimal
impact on the existing FSMs.  It could easily be adapted to the split
circuit setup proposal that is still out for comments.

Let me know what you think.  (That goes for everyone.)

Steve

Circuit Establishment Collision

    LAN             Origin DLSw    Origin DLSw         LAN

MAC = 400000000099               |                   MAC = 400000000098
                |                |                  |
                |  DISCONNECTED  |   DISCONNECTED   | Note: 1
                |                |                  |
                |                |                  |  <---TEST cmd
 TEST cmd --->  |                |                  |
                |                |                  <--DLC_RESOLVE_C
 DLC_RESOLVE_C-->                |                  |
                |                <--CANUREACH       | Note: 2
                |                |                  |
                |     CANUREACH-->                  | optional:
                |                |                  |  (TEST cmd --->)
                |  DISCONNECTED  |                  |  (<--- TEST rsp)
                |                |                  |
                |                <--ICANREACH       | Note: 3
                |                |                  |
                |                | CIRCUIT_PENDING  |
                |                |                  |
                |     REACH_ACK-->                  | Note: 4
                |                |                  |
                | CIRCUIT_ESTAB  |  CIRCUIT_ESTAB   |
                |                |                  |
                <--DLC_RESOLVE_R |                  |
                |                |                  |
  <---TEST rsp  |                |                  |
                |                |                  |

Note 1. Once the TEST frame has been received both LANs present a
DLC_RESOLVE_C request to their associated DLSw.  On receiving a
DLC_RESOLVE_C request both DLSw's search their destination table caches
for a matching destination MAC address.  If one is found they forwards a
CANUREACH request to the associated target DLSw.  If one is not found
then they forward a CANUREACH request to each of their designated target
DLSw's.

Note 2. On receiving a CANUREACH request and recognizing that it
has a CANUREACH outstanding for the opposite Data Link ID, each
DLSw must resolve the collision.  The same criteria must be applied
by both DLSw's for deciding which one gets to initiate the circuit.
I propose that the circuit with the highest origin MAC address should
be the one that is established.  In this case, the DLSw on the right
would respond to the CANUREACH (immediately or after an optional
TEST resolve procedure).  The DLSw on the left would defer and drop
the CANUREACH it received, remaining in DISCONNECTED state.

Note 3. When the DLSw on the right responds with the ICANREACH response
it places the circuit into the CIRCUIT_PENDING state.  At this point,
the bringup proceeds along the same as a non-collision scenario.

Note 4. In the process of sending REACH_ACK, the DLSw on the left
also sends a DLC_RESOLVE_R response to the data link interface.  This
informs the data link interface to respond to the original TEST command
which started the route discovery process.  The receipt of the REACH_ACK
by the DLSw on the right places the circuit into the CIRCUIT_ESTABISHED
state.

Also noted is that XID could replace the TEST for initiating this circuit
establishment.

Note on address comparisons:  All bits in the origin and target MAC
address should be used when comparing addresses except for the
'routing information included' bit (byte 0, bit 0) in the source MAC
address.

---

From: Bernard Brady <[email-masked]>
Date: Tue, 8 Feb 94 10:07:37 EDT

Steve,

I've updated my previous flow and added changes where needed. 

Bernie

                |   DISCONNECTED |  DISCONNECTED    | Note: 1         |
|                  |
                |                |                  |     <---TEST
 TEST--->       |                |                  |
                |                |                  <--DLC_RESOLVE_C
 DLC_RESOLVE_C-->                |                  |
                |                <--CANUREACH       |
                |     CANUREACH-->                  |
                |                |                  | Note: 2         |
|                  |
         (TargetCirId=3003)    ICANREACH-->                  |
                |                <--ICANREACH   (TargetCirID =1001)   |
                |                |                  |
                |                |                  | Note: 3         |
|                  |
       |                <--REACH_ACK 
		|          (OriginCirID=1001,TargetCirID=3003)      |
                |     REACH_ACK-->                  |
		|(OriginCirID=3003, TargetCirID=1001)
                |                |                  |
                |                |                  |
                <--DLC_RESOLVE_R |    DLC_RESOLVE_R->
                |                |                  |
  <--TEST       |                |                  |    TEST--->
                |                |                  | Note: 4         |
|                  |
                |[CIRCUIT_PNDING]| [CIRCUIT_PNDING] |
                |                |                  |
                | [CIRCUIT_ESTAB]| [CIRCUIT_ESTAB]  |

Note 2. On receiving a CANUREACH request and identifying that it
has a CANUREACH outstanding  for the opposite Data Link ID both
DLSws respond with an ICANREACH.  Any other  CANUREACH requests for the
opposite Data Link ID are ignored. On sending the ICANREACH the state
should be changed to CIRCUIT_PENDING. 

Note 3. When each  DLSw receives the ICANREACH response it 
responds with a REACH_ACK to the other DLSw. 

I contend that the  REACH_ACK's have created a single circuit which is 
labeled either.

 (OriginCirID=1001, TargetCirID=3003)      
 (OriginCirID=3003, TargetCirID=1001)

The  Frame Direction field will differentiate which field  target or
origin is to be used by DLSw as the local versus remote circuit id. 

For clarification in this case  by  renaming Target to Local and Origin
to Remote it seems clear that they are the same circuit. 

<--REACH_ACK(OriginCirID=1001, TargetCirID=3003)   Frame Direction = 0x01
(OriginCirID=3003, TargetCirID=1001)REACH_ACK--> Frame Direction = 0x01

On receipt the  Frame Direction field will identify that  the target
circuit ID is to be used by the receiveing DLSw as its circuit id.  

Note 4. On receipt of the REACH_ACK each DLSw places the circuit into
the CIRCUIT_ESTAB state and stops the non-REACH_ACK response timer
The DLSw will also send a DLC_RESOLVE_R response to the data link
interface.   This informs the data link interface to respond to the 
original TEST request which started the route discovery process.

On receiving the REACH_ACK DLSw verifies that the expected  Origin and
Target Circuit ID's are received.  If they are not correct then the
circuit is taken down with a HALT_DL_NOACK.

This also deals with systems under the current RFC which ignore the  
Circuit Establishment Collision

                |   DISCONNECTED |  DISCONNECTED    | Note: 1         |
|                  |
                |                |                  |     <---TEST
 TEST--->       |                |                  |
                |                |                  <--DLC_RESOLVE_C
 DLC_RESOLVE_C-->                |                  |
                |                <--CANUREACH       |
                |     CANUREACH-->                  |
                |                |                  | Note: 2         |
|                  |
                |                <--ICANREACH   (TargetCirID =1001)   |
                |                |                  |
                |                |                  | Note: 3         |
|                  |
                |     REACH_ACK-->                  |
		|(OriginCirID=3003, TargetCirID=1001)
                |                |                  |
                |                |                  |
                <--DLC_RESOLVE_R |    DLC_RESOLVE_R->
                |                |                  |
  <--TEST       |                |                  |    TEST--->
                |                |                  | Note: 4         |
|                  |
                |[CIRCUIT_PNDING]| [CIRCUIT_PNDING] |
                |                |                  |
                | [CIRCUIT_ESTAB]| [CIRCUIT_ESTAB]  |

>swap the origin and destination circuit IDs.

The Frame Direction field will differentiate which field is target or
origin so there is not need to swap any of the addresses.

>Let me know what you think.  (That goes for everyone.)

The example below will not work  if DLSw with MAC address 4--099 is
under the existing RFC since it will ignore the CANUREACH.  It will only
work in those case where it is the lower of the two.  My proposal works 
for both.

Bernie